/**
 * 
 */
package co.fitstart.payment.web.handler;

import java.util.Map;

import com.demo2do.core.wechat.pay.WechatPayNotification;

import co.fitstart.payment.entity.app.App;

/**
 * @author lute
 *
 */
public interface SignatureHandler {

    /**
     * Check signature validity of given parameters but ignore those specific keys according to app
     * 
     * @param app
     * @param signature
     * @param parameters
     * @param ignoreKeys
     * @return
     */
    public boolean checkAppSignature(App app, String signature, Map<String, String> parameters, String... ignoreKeys);
    
    /**
     * Check WeChat notification signature validity
     * 
     * @param notification
     * @param paySecret
     * @return
     */
    public boolean checkWechatNotificationSignature(WechatPayNotification notification, String paySecret);

}
